let http = require('http');
// let url = require('url');
let fs = require('fs');
let server = http.createServer((request, response) => {
  response.writeHead(200, {"Content-Type": "application/json"});
  if(request.url === '/disk') {
    fs.createReadStream(__dirname+"/disk.json")
    .pipe(response);
    // response.end(JSON.stringify(myObj));
  } else{
    response.end("404");
  }

})
server.listen(3000, "127.0.0.1");
console.log("Server running at http://127.0.0.1:3000/");

